Skip to content
This repository was archived by the owner on Aug 2, 2021. It is now read-only.

Handle compress edge cases in pyramid chunker#713

Merged
janos merged 3 commits into
swarm-network-rewritefrom
pyramid-fix2
Jun 14, 2018
Merged

Handle compress edge cases in pyramid chunker#713
janos merged 3 commits into
swarm-network-rewritefrom
pyramid-fix2

Conversation

@janos
Copy link
Copy Markdown
Member

@janos janos commented Jun 13, 2018

This change solves the issue discovered by uploading a file 816778334 bytes long, and preserves the functionality of the previous cases. If compress is done multiple times, it should be by setting the chunk level to nil, and at the end to remove nil chunk levels with new function cleanChunkLevels.

@janos janos requested review from gbalint and zelig June 13, 2018 15:38
Comment thread swarm/storage/pyramid.go Outdated
return
}

// cleanChunkLevels removes gaps (nil levles) between chunk levels
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

levles -> levels

@nonsense nonsense self-requested a review June 14, 2018 18:40
@janos
Copy link
Copy Markdown
Member Author

janos commented Jun 14, 2018

Thank you for reviews.

@janos janos merged commit 9d35ceb into swarm-network-rewrite Jun 14, 2018
@janos janos deleted the pyramid-fix2 branch June 14, 2018 20:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants